package com.seaboxdata.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seaboxdata.dao.DataMonitorResultDao;
import com.seaboxdata.entity.DataMonitorConfig;
import com.seaboxdata.entity.DataMonitorResult;
import com.seaboxdata.service.DataMonitorResultService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author
 * @create 2020-08-06 14:19
 **/
@Service("dataMonitorResultService")
public class DataMonitorResultServiceImpl extends ServiceImpl<DataMonitorResultDao,DataMonitorResult> implements DataMonitorResultService {

    @Override
    public DataMonitorResult getResult(DataMonitorConfig dataMonitorConig){
       return baseMapper.getResult(dataMonitorConig);
    }

    @Override
    public int getTotalCount(DataMonitorConfig dataMonitorConig) {
        return baseMapper.getTotalCount(dataMonitorConig);
    }

    @Override
    public List<DataMonitorResult> getLatestResults(Date beginDate, Date endDate) {
        return baseMapper.getLatestResults(beginDate,endDate);
    }
}
